-- GENERATED SPELL FOR [Amani'shi Protector] --


function spell0_24180(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24180', 635, 1)
end

function spell1_24180(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(43529,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24180', 5338, 1)
end

function spell2_24180(pUnit, Event) --@Piercing Howl,Self--
pUnit:FullCastSpellOnTarget(43530,pUnit)
pUnit:RegisterEvent('Sorts_24180', 6318, 1)
end

function Sorts_24180(pUnit, Event)
local choix_sorts_24180 = math.random(0, 2)
if choix_sorts_24180 == 0 then
pUnit:RegisterEvent('spell0_24180', 1, 1)
end
if choix_sorts_24180 == 1 then
pUnit:RegisterEvent('spell1_24180', 1, 1)
end
if choix_sorts_24180 == 2 then
pUnit:RegisterEvent('spell2_24180', 1, 1)
end
end

function mob24180_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24180', math.random(1500, 3000), 1)
end

function mob24180_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24180_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24180_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24180, 1, 'mob24180_Action')
RegisterUnitEvent(24180, 2, 'mob24180_Leave')
RegisterUnitEvent(24180, 3, 'mob24180_Kill')
RegisterUnitEvent(24180, 4, 'mob24180_Die')
